﻿@using Pottery.Frontend.Resources
@model Pottery.Frontend.ViewModels.ProductsViewModel

@{
    ViewBag.Title = ViewProducts.PriceList;
}

@{Html.RenderPartial("CatalogsPartial", Model.Catalogs);}

@foreach (var product in Model.Products)
{
    <div class="productItem">
        <div class="divProdImg">
            <a href="@Url.Action("ViewProductDetails", "Product", new { productId = product.Id })">
                <img src="@Url.Content("~/Content/images/PictMock.jpg")" alt="@product.Name" class="productImg" />
            </a>
        </div>
        <div class="divProdImg width">
            <p>@Html.ActionLink(@product.Name, "ViewProductDetails", "Product", new { productId = product.Id }, null)</p>
            <p><span class="titleProduct">@ViewProducts.Description </span>@product.Description</p>
            <p><span class="titleProduct">@ViewProducts.Price </span>@product.Price@ViewProducts.MockCurrency</p>
        </div>
        <div class="divProdImg">
            @using (Html.BeginForm("AddToCart", "Cart",
                new { productId = product.Id, returnUrl = Request.Url.PathAndQuery }))
            {
                <input type="submit" value="@ViewProducts.AddToCart" />
            }
        </div>
    </div>
    <br />
}


